import request from '@/utils/request'
// 获取组织架构
export const getOrganizationChartAPI = () => {
  return request({
    url: '/company/department'
  })
}
/**
 *
 * @param {*} id 部门id
 * @returns  object
 */
export const delDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 新增部门
export function addDepartmentsAPI(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
